package com.ruoyi.mes.domain;

import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.mes.vo.sales.SellOrderVo;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 生产计划对象 pln_master_plan
 * 
 * @author CFL
 * @date 2024-04-28
 */
public class PlnMasterPlan extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主计划id */
    private Long id;

    /** 订单id */
    private Long orderId;

    /** 产品id */
    private Long proId;

    /** 主计划编号 */
    @Excel(name = "主计划编号")
    private String planSn;


    /** 订单编号 */
    @Excel(name = "订单编号")
    private String orderSn;


    /** 订单名称 */
    @Excel(name = "订单名称")
    private String orderName;


    /** 订单类型;0：销售订单；1：样品订单；2：测试订单 */
    @Excel(name = "订单类型;0：销售订单；1：样品订单；2：测试订单")
    private Integer orderType;



    /** 产品名称 */
    @Excel(name = "产品名称")
    private String proName;


    /** 产品编码 */
    @Excel(name = "产品编码")
    private String proSn;

    /** 主计划状态 */
    @Excel(name = "主计划状态")
    private Integer planState;



    /** 产品下达数量 */
    private Long num;

    /** 产品总需求数量 */
    private Long proNum;

    /** 产品已下达数量 */
    private Long releasedNum;


    /** 计划下达日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "计划下达日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date planDate;

    /** 计划开始日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "计划开始日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date planStartDate;

    /** 计划截止日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "计划截止日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date planEndDate;

    /** 0：未下达；1：已下达 */
    @Excel(name = "0：未下达；1：已下达")
    private Long state;

    /** 逻辑删除;0：存在；1：删除 */
    private Integer isDeleted;



    /** 生产计划下达物料计划列表 */
    private List<PlnMasterPlan> planInfoList;

    /** 创建者 */
    @Excel(name = "创建者")
    private String createdBy;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createdTime;

    /** 更新者 */
    private String updatedBy;

    /** 更新时间 */
    private Date updatedDate;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setOrderId(Long orderId) 
    {
        this.orderId = orderId;
    }

    public Long getOrderId() 
    {
        return orderId;
    }
    public void setProId(Long proId) 
    {
        this.proId = proId;
    }

    public Long getProId() 
    {
        return proId;
    }
    public void setPlanSn(String planSn) 
    {
        this.planSn = planSn;
    }

    public String getPlanSn() 
    {
        return planSn;
    }
    public void setPlanState(Integer planState) 
    {
        this.planState = planState;
    }

    public Integer getPlanState() 
    {
        return planState;
    }

    public void setProNum(Long proNum)
    {
        this.proNum = proNum;
    }

    public Long getProNum()
    {
        return proNum;
    }

    public Long getNum() {
        return num;
    }

    public void setNum(Long num) {
        this.num = num;
    }

    public Long getReleasedNum() {
        return releasedNum;
    }

    public void setReleasedNum(Long releasedNum) {
        this.releasedNum = releasedNum;
    }

    public void setPlanStartDate(Date planStartDate) 
    {
        this.planStartDate = planStartDate;
    }

    public Date getPlanDate()
    {
        return planDate;
    }
    public void setPlanDate(Date planDate)
    {
        this.planDate = planDate;
    }

    public Date getPlanStartDate() 
    {
        return planStartDate;
    }
    public void setPlanEndDate(Date planEndDate) 
    {
        this.planEndDate = planEndDate;
    }

    public Date getPlanEndDate() 
    {
        return planEndDate;
    }

    public void setState(Long state)
    {
        this.state = state;
    }

    public Long getState()
    {
        return state;
    }

    public void setIsDeleted(Integer isDeleted) 
    {
        this.isDeleted = isDeleted;
    }

    public Integer getIsDeleted() 
    {
        return isDeleted;
    }

    public List<PlnMasterPlan> getPlanInfoList() {
        return planInfoList;
    }

    public void setPlanInfoList(List<PlnMasterPlan> planInfoList) {
        this.planInfoList = planInfoList;
    }

    public void setCreatedBy(String createdBy) 
    {
        this.createdBy = createdBy;
    }

    public String getCreatedBy() 
    {
        return createdBy;
    }
    public void setCreatedTime(Date createdTime) 
    {
        this.createdTime = createdTime;
    }

    public Date getCreatedTime() 
    {
        return createdTime;
    }
    public void setUpdatedBy(String updatedBy) 
    {
        this.updatedBy = updatedBy;
    }

    public String getUpdatedBy() 
    {
        return updatedBy;
    }
    public void setUpdatedDate(Date updatedDate) 
    {
        this.updatedDate = updatedDate;
    }

    public Date getUpdatedDate() 
    {
        return updatedDate;
    }
    public String getOrderSn() {
        return orderSn;
    }

    public void setOrderSn(String orderSn) {
        this.orderSn = orderSn;
    }
    public String getOrderName() {
        return orderName;
    }

    public void setOrderName(String orderName) {
        this.orderName = orderName;
    }
    public String getProName() {
        return proName;
    }

    public void setProName(String proName) {
        this.proName = proName;
    }
    public String getProSn() {
        return proSn;
    }

    public void setProSn(String proSn) {
        this.proSn = proSn;
    }
    public Integer getOrderType() {
        return orderType;
    }

    public void setOrderType(Integer orderType) {
        this.orderType = orderType;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("orderId", getOrderId())
            .append("proId", getProId())
            .append("num", getNum())
            .append("planSn", getPlanSn())
            .append("planState", getPlanState())
            .append("planDate", getPlanDate())
            .append("planStartDate", getPlanStartDate())
            .append("planEndDate", getPlanEndDate())
            .append("isDeleted", getIsDeleted())
            .append("createdBy", getCreatedBy())
            .append("createdTime", getCreatedTime())
            .append("updatedBy", getUpdatedBy())
            .append("updatedDate", getUpdatedDate())
            .append("remark", getRemark())
            .toString();
    }
}
